<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="text-css.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body>
<div  class="box" style="display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;
">
    <h1><a name="API-work-add-1">准备工作</a></h1>
    <p>更新时间：2018-12-21 13:28:08</p>
    <p>介绍云端调用服务流程，获取云端唯一身份AppKey的示例</p>
    <ul><li>获取云端唯一身份appkey</li></ul>
    <h1><a name="API-work-add-2">云端服务调用协议</a></h1>
    <p>暂时只提供HTTP方式的支持。</p>
    <h1><a name="API-work-add-3">云端服务调用流程</a></h1>
    <p>智能语音服务云端资源需要云端资源令牌(cloud token)访问。云端资源令牌通过开通云端资源服务获取。
        <br>
        主要流程如下：</p>
    <img src="img/e9bfd200-f738-418c-9ad1-b42f51f3f101.png" alt="" style="width:100%">
    <h1><a name="API-work-add-4">获取云端唯一身份appkey</a></h1>
    <img src="img/124_20190509205610.png" alt="" style="width:100%">
    <h1><a name="API-work-add-5">Java调用示例</a></h1>
    <pre class="pre-box">

// https://github.com/aliyun/iotx-api-gateway-client
public static void main(String[] args) {
    params.setAppKey("你的&ltAppKey>");
    params.setAppSecret("你的&ltAppSecret>");
    SyncApiClient client=new SyncApiClient(params);

    String token="62c1c0ea571a4960b39d34f2a49e8c23";
    VoiceApiRequest request=new VoiceApiRequest();
    request.setToken(token);

    request.putParam("deviceKey","wangjc");
    request.putParam("text","test");
    ApiResponse apiResponse=client.putBody("127.0.0.1","/api/token",request);
    System.out.println(new String(apiResponse.getBody()));
}
    </pre>

</div>
<div id="intro-platform-nav" style="position:absolute;right:100px;top:150px;width:30px;height:30px;position:fixed;z-index:1;border:1px solid #CCC;box-shadow:4px 4px 10px #E8E8E8;border-radius:10px;background:#F5F5F5	">
    <img src="img\\sanheng.png" alt="" style="width:30px;height:30px;position:fixed;position:absolute;right:0px;top:0px;">
    <div  id="nav-text" style="display:none;line-height:15px;overflow:scroll;height:200px;overflow-x:hidden;padding-left:15px;margin-top:15px">
        <p><a href="#API-work-add-1">准备工作</a></p>
        <p><a href="#API-work-add-2">云端服务调用协议</a></p>
        <p><a href="#API-work-add-3">云端服务调用流程</a></p>
        <p><a href="#API-work-add-4">获取云端唯一身份appkey</a></p>
        <p><a href="#API-work-add-5">Java调用示例</a></p>

    </div>
</div>
</body>
<script src="jquery-3.3.1.min.js"></script>
<script>
    $(document).ready(function(){
      $("#intro-platform-nav").click(function(){
       $("#intro-platform-nav").animate({
            "width":"260px",
            "height":"200px"
       },600);
       $("#nav-text").css("display","");
    });
    $("#intro-platform-nav").mouseleave(function(){
      $("#intro-platform-nav").animate({
      "width":"30px",
      "height":"30px"
      },500);
      $("#nav-text").css("display","none");
    });
     $("tr:gt(1):even()").css("background","#F5F5F5");
   })
</script>

</html>